package com.garbuz.svnadmin.data
{
	import actionlib.common.events.EventSender;

	import com.garbuz.svnadmin.services.HTTPServiceBase;

	public class DataProviderBase
	{
		private var _readyEvent:EventSender = new EventSender(this);
		private var _busyEvent:EventSender = new EventSender(this);

		public function retrieveData():void
		{
		}

		protected function getBusy():void
		{
			_busyEvent.dispatch();
		}

		protected function getReady():void
		{
			_readyEvent.dispatch();
		}

		protected function onServiceError(e:Error):void
		{
			_readyEvent.dispatch();
			HTTPServiceBase.defaultErrorHandler(e);
		}

		public function get busyEvent():EventSender
		{
			return _busyEvent;
		}

		public function get readyEvent():EventSender
		{
			return _readyEvent;
		}
	}
}
